#define _CRT_SECURE_NO_WARNINGS
#include "BinaryTree.h"


void TestBinaryTree()
{
	BTNode* root = CreatBinaryTree();
	PrevOrder(root);
	printf("\n");

	InOrder(root);
	printf("\n");

	PostOrder(root);
	printf("\n");

	int size = BinaryTreeSize(root);
	printf("BinaryTreeSize:%d\n", size);

	printf("BinaryTreeLeafSize:%d\n", BinaryTreeLeafSize(root));

	BTNode* ret = BinaryTreeFind(root, 'B');
	if (ret != NULL)
	{
		printf("BinaryTreeFind:%c\n", ret->data);
	}

	printf("BinaryTreeDepth:%d\n", BinaryTreeDepth(root));
	printf("BinaryTreeLevelKSize:%d\n", BinaryTreeLevelKSize(root, 2));
}
	

int main()
{
	TestBinaryTree();
	return 0;
}